﻿using System;
using System.Windows.Forms;
using OpenComposite.EII.Repository;

namespace OpenComposite.EII
{
	public interface IRepositoryExplorerTree
	{
		event EventHandler<OpenComposite.EII.ItemSelectedEventArgs> AddDiagram;
		event EventHandler<OpenComposite.EII.ItemSelectedEventArgs> CreateProcessForMethod;
		event EventHandler<OpenComposite.EII.ItemSelectedEventArgs> DeleteItem;
		event EventHandler<OpenComposite.EII.ItemSelectedEventArgs> ItemSelected;
		event EventHandler<OpenComposite.EII.ItemSelectedEventArgs> OpenDiagram;

		bool SelectDomainVisible { get; set; }
		bool SelectViewVisible { get; set; }
		bool ToolStripVisible { get; set; }

		int CurrentDomainID { get; set; }
		int CurrentRepositoryID { get; set; }
		OpenComposite.EII.TreeType CurrentTreeType { get; set; }
		OpenComposite.EII.Repository.ItemType CurrentViewType { get; set; }
		OpenComposite.EII.Repository.ItemType[] VisibleItemTypes { get; set; }

		OpenComposite.Base.TreeViewEx TreeView { get; }

		void UpdateRepository();
		void UpdateSubTree(OpenComposite.EII.Repository.IRepositoryItem item);

		TreeNode FindTreeNode(IRepositoryItem item);
		bool SelectRepositoryItem(IRepositoryItem item);
		bool SelectRepositoryItem(IRepositoryItem item, bool activate);
	}
}
